package com.dly.hope.repository;

import com.dly.hope.modle.UserAccount;
import org.apache.catalina.User;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

/**
 * @Author linyu.dai
 * @Date 2022/8/26 10:55
 */
public interface UserAccountRepository extends JpaRepository<UserAccount, String> {

   Optional<UserAccount> findTopByAccountNumberAndDataStatus(String account, Integer dateStatus);

   Optional<UserAccount> findByEmailAndDataStatus(String email, Integer dateStatus);

   Optional<UserAccount> findByAccountNumberAndDataStatus(String account,Integer dateStatus);

   Optional<UserAccount> findByIdAndDataStatus(String id, Integer dateStatus);

   List<UserAccount> findAllByIdInAndDataStatus(List<String> ids, Integer dateStatus);

   List<UserAccount> findAllByIdIn(List<String> ids);
}
